home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
NetNews Offline 2
/
NetNews Offline Volume 2.iso
/
news
/
comp
/
std
/
c
/
272
< prev
next >
Wrap
Internet Message Format
|
1996-08-06
|
2KB
Path: news.atml.co.uk!jrr
From: jrr@atml.co.uk (John Rickard)
Newsgroups: comp.std.c
Subject: Re: size_t
Date: 1 Feb 1996 20:00:22 GMT
Organization: Advanced Telecommunications Modules Ltd, Cambridge, UK.
Message-ID: <4er64m$pnv@gatekeeper.atml.co.uk>
References: <4eiua2$9u@engnews1.Eng.Sun.COM>
NNTP-Posting-Host: marlin.atml.co.uk
X-Newsreader: TIN [version 1.2 PL2]
Steve Clamage (clamage@Eng.Sun.COM) wrote:
: I have always thought that type size_t must be defined as one of
: the standard unsigned integer types: unsigned [char | short | int | long].
: I don't find wording in the ISO standard requiring that, however.
: Sections 7.1.6 and 6.3.4 say it is an "unsigned integral type", a term
: I don't find defined. "Integer type" is defined, but not "integral type".
6.1.2.5 says "The type char, the signed and unsigned integer types,
and the enumerated types are collectively called integral types".
I can't find a definition of "unsigned integral type". These must
certainly include the unsigned integer types; probably also char if
values stored in a char object are treated as nonnegative integers,
and enumerated types that are compatible with unsigned integer types.
Remembering that 6.5.2.2 says "Each enumerated type shall be
compatible with an integer type", I don't see any way of detecting
that size_t is not an unsigned integer type, even if it is in fact
char or an enumerated type.
6.3.3.4 says that the result of the sizeof operator (which is of type
size_t) is "an integer constant". However, this does not make sense
in relation to the definition in 6.1.3.2, which defines an integer
constant to be something like 123 or 0x12a4L -- a sequence of digits
and letters of any of certain permitted formats.
--
John Rickard